import request from '@/apis/request';
//订单列表id
export const fxygmAllListApi = (data?: Object) => {
    return request({
        url: "/cemetery/fxygm/allList",
        method: "post",
        data
    });
}
//订单详情
export const fxygmOrderDetailsApi = (data?: Object) => {
    return request({
        url: "/cemetery/fxygm/orderDetails",
        method: "post",
        data
    });
}

//墓型查询
export const getTomdTypeApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/getTomdType",
        method: "post",
        data
    });
}
//保存墓位报修
export const saveCemeteryRepairApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/saveCemeteryRepair",
        method: "post",
        data
    });
}
//代客祭扫后台
export const saveItemDirectrApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/saveItemDirectr",
        method: "post",
        data
    });
}
//在线商城商品列表
export const getSfitemlistApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/getSfitemlist",
        method: "post",
        data
    });
}
//在线商城购物车保存
export const saveshoppinginfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/saveshoppinginfo",
        method: "post",
        data
    });
}
//在线商城购物车删除
export const delshoppinginfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/delshoppinginfo",
        method: "post",
        data
    });
}
//在线商城购物车列表
export const getshoppinglistApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/getshoppinglist",
        method: "post",
        data
    });
}
//在线商城提交订单
export const saveOrderinfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/saveOrderinfo",
        method: "post",
        data
    });
}
//在线商城提交购物车订单
export const saveShopinfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/hlfxy/saveShopinfo",
        method: "post",
        data
    });
}
//墓区
export const getAareaApi = (data?: Object) => {
    return request({
        url: "/cemetery/cemetery/getAarea",
        method: "post",
        data
    });
}
// 墓穴编号
export const getCemeteryApi = (data?: Object) => {
    return request({
        url: "/cemetery/cemetery/getCemetery",
        method: "post",
        data
    });
}
// 墓区
export const xxxx1Api = (data?: Object) => {
    return request({
        url: "/bygex/kmxWeiXin/xxxx1",
        method: "post",
        data
    });
}
// 墓穴编号
export const xxxx2Api = (data?: Object) => {
    return request({
        url: "/bygex/kmxWeiXin/xxxx2",
        method: "post",
        data
    });
}
// 墓型
export const xxxx3Api = (data?: Object) => {
    return request({
        url: "/bygex/kmxWeiXin/xxxx3",
        method: "post",
        data
    });
}


//发送短信验证码接口
export const bygexSendSmsApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/bygexSendSms",
        method: "post",
        data
    });
}
//根据手机号查询族谱
export const getClanByPhoneApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/getClanByPhone",
        method: "post",
        data
    });
}
export const fileUploadBase64ExApi = (data?: Object) => {
    return request({
        url: "/business/api/file/fileUploadBase64Ex",
        method: "post",
        data
    });
}
//保存宗族信息
export const saveClanInfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/saveClanInfo",
        method: "post",
        data
    });
}
//保存宗族人员信息
export const saveClanMemberInfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/saveClanMemberInfo",
        method: "post",
        data
    });
}
//保存或更新配偶信息
export const saveSpouseInfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/saveSpouseInfo",
        method: "post",
        data
    });
}
//查询人员信息
export const getSpouseInfoByIdApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/getSpouseInfoById",
        method: "post",
        data
    });
}
//新增父亲
export const saveFatherInfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/saveFatherInfo",
        method: "post",
        data
    });
}
//删除人员信息
export const delUserInfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/delUserInfo",
        method: "post",
        data
    });
}

//编辑页面信息展示
export const getClanByIdApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/getClanById",
        method: "post",
        data
    });
}

//锁
export const ClanRedisLockApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/ClanRedisLock",
        method: "post",
        data
    });
}
//解锁
export const DelClanRedisLockApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/DelClanRedisLock",
        method: "post",
        data
    });
}
//删除族谱信息
export const delClanInfoApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/delClanInfo",
        method: "post",
        data
    });
}
//获取族谱树
export const getClanMemberByIdApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/getClanMemberById",
        method: "post",
        data
    });
}
//家族排行
export const getClanRankListApi = (params?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/getClanRankList",
        method: "get",
        params
    });
}
//族谱树更换图片
export const updateImgApi = (data?: Object) => {
    return request({
        url: "/cemetery/onlinegenealogy/updateImg",
        method: "post",
        data
    });
}

// 预约扫墓
export const GmsmyuyApi = (data?: object) => {
    return request({
        url: "/cemetery/fhs/print/Gmsmyuy",
        method: "post",
        data
    })
}
// 身份证验证接口
export const idOrcApi = (data?: Object) => {
    return request({
        // url: "/assistanceWeixin/idOrc",
        // url: "/business/api/baiduApi/idCard",
        url: "/bygapi/api/baiduApi/idCard",
        method: "post",
        data
    });
}
// 预约看墓
export const GmkmyuyApi = (data?: object) => {
    return request({
        url: "/cemetery/fhs/print/Gmkmyuy",
        method: "post",
        data
    })
}
//云祭祀部分
export const cloudMemorialServiceLoginApi = (data?: Object) => {
    return request({
        url: '/cemetery/tomb/cloudMemorialServiceLogin',
        method: 'post',
        data
    })
}
export const fileUploadBase64Api = (data?: Object) => {
    // let data = {
    //     token: sessionStorage.getItem("token"),
    //     data: data,
    //     isJson: "Y"
    // }
    return request({
        url: '/business/api/file/fileUploadBase64',
        method: 'post',
        data
    })
}
// 建馆
export const createHallApi = (data?: Object) => {
    return request({
        url: '/cemetery/tomb/createHall',
        method: 'post',
        data
    })
}
export const checkSavaApi = (data?: Object) => {
    return request({
        url: '/cemetery/tomb/checkSava',
        method: 'post',
        data
    })
}
// 网上祭祀
export const getHallFirendApi = (data?: object) => {
    return request({
        url: "/cemetery/tomb/getHallFirend",
        method: "post",
        data
    })
}
// 网上祭祀
export const getHallApi = (data?: object) => {
    return request({
        url: "/cemetery/fhs/print/getHall",
        method: "post",
        data
    })
}
// 网上祭祀
export const getGiftInfoApi = (data?: object) => {
    return request({
        url: "/cemetery/cloudsacrifice/getGiftInfo",
        method: "post",
        data
    })
}
// 网上祭祀
export const saveUserGiftApi = (data?: object) => {
    return request({
        url: "/cemetery/cloudsacrifice/saveUserGift",
        method: "post",
        data
    })
}
// 网上祭祀保存头像
export const saveUserInfoApi = (data?: object) => {
    return request({
        url: "/cemetery/fhs/print/saveUserInfo",
        method: "post",
        data
    })
}
// 网上祭祀
export const updatePasswordApi = (data?: object) => {
    return request({
        url: "/cemetery/cloudsacrifice/updatePassword",
        method: "post",
        data
    })
}
// 网上祭祀判断是否有权限设置
export const getUserInfoApi = (data?: object) => {
    return request({
        url: "/cemetery/cloudsacrifice/getUserInfo",
        method: "post",
        data
    })
}




// 微信
// 第二步：通过code换取网页授权access_token
// appid：公众号的唯一标识 secret：公众号的appsecret code：填写第一步获取的code参数 grant_type：填写为authorization_code
export const weixinAccessTokenApi = (params: Object) => {
    return request({
        // url: "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code",
        url: "/sns/oauth2/access_token",
        // url: '/sns/oauth2/access_token?appid=' + params.appid + '&secret=' + params.secret + '&code=' + params.code + '&grant_type=authorization_code',
        method: "get",
        params
    });
}
// 第三步：刷新access_token（如果需要）
// appid：公众号的唯一标识 grant_type：填写为refresh_token refresh_token：填写通过access_token获取到的refresh_token参数
export const weixinRefreshTokenApi = (params: Object) => {
    return request({
        url: "/sns/oauth2/refresh_token",
        method: "get",
        params
    });
}
// 第四步：拉取用户信息(需scope为 snsapi_userinfo)
// appid：公众号的唯一标识 grant_type：填写为refresh_token refresh_token：填写通过access_token获取到的refresh_token参数
export const weixinUserinfoApi = (params: Object) => {
    return request({
        url: "/sns/userinfo",
        method: "get",
        params
    });
}
export const wechatPayApi = (data: Object) => {
    return request({
        url: "/cemetery/fhs/print/wechatPay",
        method: "post",
        data
    });
}
// 墓位查询列表
export const WSJSYTJApi = (data?: Object) => {
    return request({
        url: "/cemetery/fhs/print/WSJSYTJ",
        method: "post",
        data
    });
}
// 墓位查询信息
export const WXZFXFApi = (data?: Object) => {
    return request({
        url: "/cemetery/fhs/print/WXZFXF",
        method: "post",
        data
    });
}








// 读取逝者信息
export const getbzhmInfoApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/getbzhmInfo",
        method: "post",
        data
    });
}

export const getCityApi = (data?: Object) => {
    return request({
        url: "/api/api/common/getCity",
        // url: "/business/api/common/getCityNoSign",
        method: "post",
        data
    });
}

export const getDeathReasonApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/getDeathReason",
        method: "post",
        data
    });
}
// 惠民申报信息列表
export const getDeclarationListApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/getDeclarationList",
        method: "post",
        data
    });
}
// 保存惠民申报信息
export const saveOnlineReportingApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/saveOnlineReporting",
        method: "post",
        data
    });
}
// 获取时间段
export const querytimesApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/querytimes",
        method: "post",
        data
    });
}
// 线上预约保存
export const saveReserveInfoApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/saveReserveInfo",
        method: "post",
        data
    });
}
// 预约记录
export const yuyuelistApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/yuyuelist",
        method: "post",
        data
    });
}
// 取消预约
export const cancelYuyueInfoApi = (data?: Object) => {
    return request({
        url: "/bygex/tzjjweixin/cancelYuyueInfo",
        method: "post",
        data
    });
}
// 身份证验证接口
export const idOrc = (data?: Object) => {
    return request({
        // url: "/assistanceWeixin/idOrc",
        // url: "/business/api/baiduApi/idCard",
        url: "/bygapi/api/baiduApi/idCard",
        method: "post",
        data
    });
}


// 遗体接运预约车辆
export const getTransportVehicleApi = (data?: Object) => {
    return request({
        url: "/bygex/kmxWeiXin/getTransportVehicle",
        method: "post",
        data
    });
}
// 遗体接运预约服务项目
export const getTransportServiceApi = (data?: Object) => {
    return request({
        url: "/bygex/kmxWeiXin/getTransportService",
        method: "post",
        data
    });
}

// 遗体接运预约查看
export const getRecordDetailsApi = (data?: Object) => {
    return request({
        url: "/bygex/kmxWeiXin/getRecordDetails",
        method: "post",
        data
    });
}
